Integrand size = 21, antiderivative size = 161 \[ \int \cos ^3(c+d x) (a+b \tan (c+d x))^n \, dx=\frac {\operatorname {AppellF1}\left (1+n,\frac {5}{2},\frac {5}{2},2+n,\frac {a+b \tan (c+d x)}{a-\sqrt {-b^2}},\frac {a+b \tan (c+d x)}{a+\sqrt {-b^2}}\right ) \cos ^5(c+d x) (a+b \tan (c+d x))^{1+n} \left (1-\frac {a+b \tan (c+d x)}{a-\sqrt {-b^2}}\right )^{5/2} \left (1-\frac {a+b \tan (c+d x)}{a+\sqrt {-b^2}}\right )^{5/2}}{b d (1+n)} \]
AppellF1(1+n,5/2,5/2,2+n,(a+b*tan(d*x+c))/(a-(-b^2)^(1/2)),(a+b*tan(d*x+c) )/(a+(-b^2)^(1/2)))*cos(d*x+c)^5*(a+b*tan(d*x+c))^(1+n)*(1+(-a-b*tan(d*x+c ))/(a-(-b^2)^(1/2)))^(5/2)*(1+(-a-b*tan(d*x+c))/(a+(-b^2)^(1/2)))^(5/2)/b/ d/(1+n)
Result contains complex when optimal does not.
Time = 8.43 (sec) , antiderivative size = 341, normalized size of antiderivative = 2.12 \[ \int \cos ^3(c+d x) (a+b \tan (c+d x))^n \, dx=\frac {2 \left (a^2+b^2\right )^2 (2+n) \operatorname {AppellF1}\left (1+n,\frac {5}{2},\frac {5}{2},2+n,\frac {a+b \tan (c+d x)}{a-i b},\frac {a+b \tan (c+d x)}{a+i b}\right ) \cos ^7(c+d x) (-i+\tan (c+d x)) (i+\tan (c+d x)) (a+b \tan (c+d x))^{1+n}}{(a-i b) (a+i b) b d (1+n) \left (2 \left (a^2+b^2\right ) (2+n) \operatorname {AppellF1}\left (1+n,\frac {5}{2},\frac {5}{2},2+n,\frac {a+b \tan (c+d x)}{a-i b},\frac {a+b \tan (c+d x)}{a+i b}\right )+5 \left ((a-i b) \operatorname {AppellF1}\left (2+n,\frac {5}{2},\frac {7}{2},3+n,\frac {a+b \tan (c+d x)}{a-i b},\frac {a+b \tan (c+d x)}{a+i b}\right )+(a+i b) \operatorname {AppellF1}\left (2+n,\frac {7}{2},\frac {5}{2},3+n,\frac {a+b \tan (c+d x)}{a-i b},\frac {a+b \tan (c+d x)}{a+i b}\right )\right ) (a+b \tan (c+d x))\right )} \]
(2*(a^2 + b^2)^2*(2 + n)*AppellF1[1 + n, 5/2, 5/2, 2 + n, (a + b*Tan[c + d *x])/(a - I*b), (a + b*Tan[c + d*x])/(a + I*b)]*Cos[c + d*x]^7*(-I + Tan[c + d*x])*(I + Tan[c + d*x])*(a + b*Tan[c + d*x])^(1 + n))/((a - I*b)*(a + I*b)*b*d*(1 + n)*(2*(a^2 + b^2)*(2 + n)*AppellF1[1 + n, 5/2, 5/2, 2 + n, ( a + b*Tan[c + d*x])/(a - I*b), (a + b*Tan[c + d*x])/(a + I*b)] + 5*((a - I *b)*AppellF1[2 + n, 5/2, 7/2, 3 + n, (a + b*Tan[c + d*x])/(a - I*b), (a + b*Tan[c + d*x])/(a + I*b)] + (a + I*b)*AppellF1[2 + n, 7/2, 5/2, 3 + n, (a + b*Tan[c + d*x])/(a - I*b), (a + b*Tan[c + d*x])/(a + I*b)])*(a + b*Tan[ c + d*x])))
Time = 0.34 (sec) , antiderivative size = 185, normalized size of antiderivative = 1.15, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {3042, 3992, 514, 150}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \cos ^3(c+d x) (a+b \tan (c+d x))^n \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {(a+b \tan (c+d x))^n}{\sec (c+d x)^3}dx\) |
\(\Big \downarrow \) 3992 |
\(\displaystyle \frac {\sec (c+d x) \int \frac {(a+b \tan (c+d x))^n}{\left (\tan ^2(c+d x)+1\right )^{5/2}}d(b \tan (c+d x))}{b d \sqrt {\sec ^2(c+d x)}}\) |
\(\Big \downarrow \) 514 |
\(\displaystyle \frac {\sec (c+d x) \left (1-\frac {a+b \tan (c+d x)}{a-\sqrt {-b^2}}\right )^{5/2} \left (1-\frac {a+b \tan (c+d x)}{a+\sqrt {-b^2}}\right )^{5/2} \int \frac {(a+b \tan (c+d x))^n}{\left (1-\frac {a+b \tan (c+d x)}{a-\sqrt {-b^2}}\right )^{5/2} \left (1-\frac {a+b \tan (c+d x)}{a+\sqrt {-b^2}}\right )^{5/2}}d(a+b \tan (c+d x))}{b d \left (\tan ^2(c+d x)+1\right )^{5/2} \sqrt {\sec ^2(c+d x)}}\) |
\(\Big \downarrow \) 150 |
\(\displaystyle \frac {\sec (c+d x) \left (1-\frac {a+b \tan (c+d x)}{a-\sqrt {-b^2}}\right )^{5/2} \left (1-\frac {a+b \tan (c+d x)}{a+\sqrt {-b^2}}\right )^{5/2} (a+b \tan (c+d x))^{n+1} \operatorname {AppellF1}\left (n+1,\frac {5}{2},\frac {5}{2},n+2,\frac {a+b \tan (c+d x)}{a-\sqrt {-b^2}},\frac {a+b \tan (c+d x)}{a+\sqrt {-b^2}}\right )}{b d (n+1) \left (\tan ^2(c+d x)+1\right )^{5/2} \sqrt {\sec ^2(c+d x)}}\) |
(AppellF1[1 + n, 5/2, 5/2, 2 + n, (a + b*Tan[c + d*x])/(a - Sqrt[-b^2]), ( a + b*Tan[c + d*x])/(a + Sqrt[-b^2])]*Sec[c + d*x]*(a + b*Tan[c + d*x])^(1 + n)*(1 - (a + b*Tan[c + d*x])/(a - Sqrt[-b^2]))^(5/2)*(1 - (a + b*Tan[c + d*x])/(a + Sqrt[-b^2]))^(5/2))/(b*d*(1 + n)*Sqrt[Sec[c + d*x]^2]*(1 + Ta n[c + d*x]^2)^(5/2))
3.7.54.3.1 Defintions of rubi rules used
Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_)*((e_) + (f_.)*(x_))^(p_), x_ ] :> Simp[c^n*e^p*((b*x)^(m + 1)/(b*(m + 1)))*AppellF1[m + 1, -n, -p, m + 2 , (-d)*(x/c), (-f)*(x/e)], x] /; FreeQ[{b, c, d, e, f, m, n, p}, x] && !In tegerQ[m] && !IntegerQ[n] && GtQ[c, 0] && (IntegerQ[p] || GtQ[e, 0])
Int[((c_) + (d_.)*(x_))^(n_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> With[ {q = Rt[-a/b, 2]}, Simp[(a + b*x^2)^p/(d*(1 - (c + d*x)/(c - d*q))^p*(1 - ( c + d*x)/(c + d*q))^p) Subst[Int[x^n*Simp[1 - x/(c + d*q), x]^p*Simp[1 - x/(c - d*q), x]^p, x], x, c + d*x], x]] /; FreeQ[{a, b, c, d, n, p}, x] && NeQ[b*c^2 + a*d^2, 0]
Int[sec[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n _), x_Symbol] :> Simp[Sec[e + f*x]/(b*f*Sqrt[Sec[e + f*x]^2]) Subst[Int[( a + x)^n*(1 + x^2/b^2)^(m/2 - 1), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b , e, f, n}, x] && NeQ[a^2 + b^2, 0] && IntegerQ[(m - 1)/2]
\[\int \left (\cos ^{3}\left (d x +c \right )\right ) \left (a +b \tan \left (d x +c \right )\right )^{n}d x\]
\[ \int \cos ^3(c+d x) (a+b \tan (c+d x))^n \, dx=\int { {\left (b \tan \left (d x + c\right ) + a\right )}^{n} \cos \left (d x + c\right )^{3} \,d x } \]
Timed out. \[ \int \cos ^3(c+d x) (a+b \tan (c+d x))^n \, dx=\text {Timed out} \]
\[ \int \cos ^3(c+d x) (a+b \tan (c+d x))^n \, dx=\int { {\left (b \tan \left (d x + c\right ) + a\right )}^{n} \cos \left (d x + c\right )^{3} \,d x } \]
\[ \int \cos ^3(c+d x) (a+b \tan (c+d x))^n \, dx=\int { {\left (b \tan \left (d x + c\right ) + a\right )}^{n} \cos \left (d x + c\right )^{3} \,d x } \]
Timed out. \[ \int \cos ^3(c+d x) (a+b \tan (c+d x))^n \, dx=\int {\cos \left (c+d\,x\right )}^3\,{\left (a+b\,\mathrm {tan}\left (c+d\,x\right )\right )}^n \,d x \]